namespace Cos.Core.NHibernate.Mapping
{
    using FluentNHibernate.Mapping;
    
    public class CustomUserFieldMap : ClassMap<CustomUserFieldDataModel>
    {
        public CustomUserFieldMap()
        {
            this.Table("CustomUserField");
            this.LazyLoad();
            this.CompositeId()
                .KeyProperty(x => x.Name)
                .KeyProperty(x => x.ApplicationName);
            this.Map(x => x.Ordering).Not.Nullable().Column("Ordering");
            this.Map(x => x.IsRequired).Not.Nullable().Column("IsRequired");
            this.Map(x => x.DataType).Not.Nullable().Column("DataType");
            //HasMany(x => x.CustomUserField_Cultures);
            //HasMany(x => x.CustomUserField_UserValues);
        }
    }
}